package com.rent.writeoff.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 核销汇总表
 */
@Data
@TableName("write_off_summary")
@ApiModel(value = "核销汇总", description = "记录每次核销任务统计结果的实体类")
public class WriteOffSummary {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID", example = "1")
    private Long id;

    /**
     * 核销任务编号
     */
    @TableField("task_no")
    @ApiModelProperty(value = "核销任务编号", example = "T20251020001", required = true)
    private String taskNo;

    /**
     * 任务开始时间
     */
    @TableField("start_time")
    @ApiModelProperty(value = "任务开始时间", example = "2025-10-20 10:00:00", required = true)
    private LocalDateTime startTime;

    /**
     * 任务结束时间
     */
    @TableField("end_time")
    @ApiModelProperty(value = "任务结束时间", example = "2025-10-20 10:05:00")
    private LocalDateTime endTime;

    /**
     * 总耗时(秒)
     */
    @TableField("total_seconds")
    @ApiModelProperty(value = "总耗时(秒)", example = "300.50")
    private BigDecimal totalSeconds;

    /**
     * 核销总笔数
     */
    @TableField("total_count")
    @ApiModelProperty(value = "核销总笔数", example = "100")
    private Integer totalCount;

    /**
     * 核销总本金
     */
    @TableField("total_principal")
    @ApiModelProperty(value = "核销总本金", example = "500000.00")
    private BigDecimal totalPrincipal;

    /**
     * 核销总利息
     */
    @TableField("total_interest")
    @ApiModelProperty(value = "核销总利息", example = "100000.00")
    private BigDecimal totalInterest;

    /**
     * 任务状态(0-处理中,1-完成,2-失败)
     */
    @TableField("status")
    @ApiModelProperty(value = "任务状态", notes = "0-处理中,1-完成,2-失败", example = "1")
    private Integer status;
}
